package com.cyan.app.workflow.bean;

import android.content.Context;

import java.util.ArrayList;

/**
 * Created by DXW on 2015/11/24.
 */
public class MannoLabBean extends BaseBean {
    private static final String TAG = "MannoLabBean";
    private static final String FILENAME = "gdlz.json";
    private static MannoLabBean sMannoLabBean;
    private ArrayList<MannoBean> mMannos;
    private Context mAppContext;

    public MannoLabBean(Context appContext) {
        mAppContext = appContext;
        mMannos = new ArrayList<MannoBean>();
    }
    public void addManno(MannoBean mannoBean) {
        mMannos.add(mannoBean);
    }

    public MannoBean getManno(String manno) {
        for (MannoBean c : mMannos) {
            if (c.getManno().equals(manno))
                return c;
        }
        return null;
    }

    public void deleteCrime(MannoBean mannoBean) {
        mMannos.remove(mannoBean);
    }

    public ArrayList<MannoBean> getMannos() {
        return mMannos;
    }

    public static MannoLabBean get(Context c) {
        if (sMannoLabBean == null) {
            sMannoLabBean = new MannoLabBean(c.getApplicationContext());
        }
        return sMannoLabBean;
    }

}



